/*
 * File Name: BaseAction.java
 */
package co.edu.uniandes.intercon.server.process;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import co.edu.uniandes.intercon.core.model.ParamDto;

/**
 * Instances of this class call business logic components in order to make 
 * business operations done
 *
 * @author Fabian Gutierrez [fagossa@gmail.com]
 */
public abstract class AbstractBaseProcess {
    
	private boolean visible = true;
	
    /**
     * Executes a determined action based on the data specified
     *
     * @param   params Data to execute the specified action
     * @return  Action result
     */
    public abstract Object execute(Map<String, Object> params) throws Exception;
    
    /**
     * Returns the name of the operation
     * @return	User readable name of the operation
     */
    public abstract String getName();
    
    /**
     * @see Object#toString()
     */
    public String toString(){
    	return getName();
    }
    
    public boolean isVisible() {
    	return visible;
    }
    
    /**
     * 
     * @return
     */
    public List<ParamDto> getSuggestedParams() {
    	return new ArrayList<ParamDto>();
    }
}
